<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS常用的长度单位</title>
  <style>
    div{
      width: 200px;
      height: 200px;
      font-size: 20px;
      /* 元素展示模式 */
      display: inline-block;

    }
    #d1{
      background-color: skyblue;
      display: inline-block;

    }
    /* 长度单位第一种   像素px */
    #d2{
      background-color: green;
      /* 元素展示模式 */
      display: inline-block;


      }
    /* 长度单位第一种   像素px */
    #d3{
      background-color: orange;
      display: inline-block;

    }
    #s1{
      background-color: orange;
      width: 100px;
      height: 40px;
      font-size: 20px;
      display: block;
    }
    #s2{
      background-color: skyblue;
      width: 100px;
      height: 40px;
      font-size: 20px;
      display: block;

    }
    #s3{
      background-color: green;
      width: 100px;
      height: 40px;
      font-size: 20px;
      display: block;

    }
  </style>
</head>
<body>
  <div id="d1">1</div>
  <div id="d2">2</div>
  <div id="d3">3</div>
  <br>
  <a id="s1" href="http://www.baidu.com">去百度</a>
  <a id="s2" href="http://www.jd.com">去京东</a>
  <a id="s3" href="http://www.toutiao.com">去头条</a>


  
</body>
</html>